/*
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2023-10-19 16:25:44
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2023-10-27 21:36:43
 */
import { Column,Entity,PrimaryGeneratedColumn,DeleteDateColumn, PrimaryColumn } from 'typeorm'
import {ApiProperty } from '@nestjs/swagger'
@Entity('departments')
export class Departments {
    @ApiProperty({
        description: 'id', default: null, type: 'int',
        example: 1, required: false,
    })
    @PrimaryGeneratedColumn()
    id: number;

    @ApiProperty({
        description: 'name', default: null, type: 'varchar',
        example: null, required: true,
    })
    @Column()
    name: string;

    @ApiProperty({
        description: 'userId', default: null, type: 'int',
        example: 0, required: true,
    })
    @Column()
    userId: number;

    @ApiProperty({
        description: 'createName', default: null, type: 'varchar',
        example: '', required: true,
        // enum: [0, 1],
    })
    @Column()
    createName: string;
    @ApiProperty({ description: '是否可删除', default: null })
    @DeleteDateColumn({
        nullable: false,
    })
    deletedTime: Date;
}

